package com.fzb.fetch.mail;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public abstract class ResponseData<T> {
    private T t;

    public Class<T> getClazz() {
        Type sType = getClass().getGenericSuperclass();
        Type[] generics = ((ParameterizedType) sType).getActualTypeArguments();

        Class<T> mTClass = (Class) generics[0];
        return mTClass;
    }

    public T getT() {
        return (T) this.t;
    }

    public void setT(Object t) {
        this.t = (T) t;
    }
}
